PHLEGM v4 - CHR ROM preview
Checkpoint: 2026-09-28

Added native CHR PREVIEW support to the existing direct CHR ROM media system.

GUI behavior
- Single-clicking a loose .BIN leaf beneath CHR LOAD opens/updates the native CHR Preview window without loading the file.
- Single-clicking a .BIN leaf inside any recursively nested ZIP does the same; recursive ZIP traversal remains capped at 16 archive layers.
- Double-click behavior is unchanged: a complete CHR LOAD leaf loads the selected image.
- CHR PREVIEW - effective active CHR is available under the top-level CHR drop-down.
- The preview is non-destructive and does not change firmware, cartridge state, mapper state, or direct-CHR insertion state.

Console / monitor
- CHR PREVIEW previews the currently effective active CHR image.
- CHR PREVIEW "file.bin" previews a loose image under /data/chr/ or an explicit path.
- CHR PREVIEW "fonts.zip" "member.bin" previews a ZIP member.
- Recursive nested ZIP selectors remain :: separated, e.g. CHR PREVIEW "fonts.zip" "packs/inner.zip::roms/petscii.bin".

Machine-driven decoding
- Commodore definitions declare chr_preview_format=mono-1bpp-row, chr_preview_page_size=2048, chr_preview_columns=16.
- Each Commodore character is decoded as 8 bytes of 1-bpp row data, most-significant pixel bit first.
- NES declares chr_preview_format=nes-2bpp-planar, chr_preview_page_size=8192, chr_preview_columns=32.
- Each NES tile is decoded from the native two 8-byte bitplanes into four grayscale levels.
- Preview interpretation is driven by machine.config.phlegm rather than filename/vendor checks.

Paging
- Commodore's current 2 KiB character ROM fits one 16x16-character preview page.
- Nintendo/NES CHR is paged in 8 KiB banks. PgUp/PgDn (or Left/Right) changes preview bank; Home/End jumps to the first/last bank.
- The preview window scales the decoded pixel sheet with nearest-neighbor Win32 presentation so tile pixels remain crisp.

Effective-active preview
- Commodore previews the live character firmware slot, including edits made while that slot is writable.
- NES previews a direct PPU CHR override when inserted; otherwise it previews the cartridge CHR ROM/RAM backing image when present.
